import tensorflow as tf
import numpy as np

a = np.array([1,2,3,4]) # 1 x 4 矩阵
# 升维度
a = a.reshape(1,4)
print(a.shape)

b = tf.constant(a) # 1 x 4 矩阵
print(b.shape)

c = b._numpy() # 1 x 4 矩阵
print(c.shape)